/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-17 14:00:29
 * Copyright (c) 2015- -版权所有
 */

package com.joysuch.wwyt.edu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.core.exception.ApiBusinessException;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.edu.bean.*;
import com.joysuch.wwyt.edu.bean.EduTrainningRecordListBean.SearchEduTrainningRecord;
import com.joysuch.wwyt.edu.entity.EduTrainningRecord;
import com.joysuch.wwyt.edu.entity.EduTrainningRecordUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface EduTrainningRecordService {

    public EduTrainningRecord add(EduTrainningRecordEditBean entity);

    void update(EduTrainningRecordEditBean entity);

    Page<EduTrainningRecordListBean> findByPage(Pageable page, SearchEduTrainningRecord condition);

    void delete(Long id) throws BusinessRestrictionsException;

    EduTrainningRecordDetailBean getById(Long id);

    EduTrainningRecord findById(Long id);

    List<EduTrainningRecordUserDetailBean> findJoinInUsersById(Long id);

    List<EduTrainningRecordUserDetailBean> certRecord(Long id);

    /**
     * 给用户颁发证书
     *
     * @param awards
     * @return
     */
    void awardUserCerts(List<EduTrainningRecordUserDetailBean> awards);

    ResultBean userInfoTrain(Long userId, Pageable pageable, Integer userContractorFlag);

    IPage<EduTrainningRecordUser> getUserTrainTime(EduTrainTimeBean eduTrainTimeBean,Integer pageNo,Integer pageSize);

    IPage<EduTrainningRecord> getRecordsByDepartId (Long departId);

    EduTrainningRecordDetailVo findDetail(Long trainingRecordId);

    List<String> importTrainningRecord(MultipartFile file);

    List<String> importExcelData(MultipartFile file)throws Exception;

    void oldData();

    Object trainningRecordList(SearchEduTrainningRecord condition);

    void trainningPublish(SearchEduTrainningRecord condition) throws ApiBusinessException;

    Object trainingStatistics(SearchEduTrainningRecord condition);

    void exportSignIn(Long id, HttpServletResponse response);

    Object studentStatistics(SearchEduTrainningRecord condition);

    Object qrCodeValid(Long id);

    Object saveTrainingResult(SearchEduTrainningRecord condition);

    void exportStudentStatistics(SearchEduTrainningRecord condition,HttpServletResponse response);

    ResultBean myTrainingList(SearchEduTrainningRecord condition);

    ResultBean myTrainingDetails(Long trainingId);

}
